﻿namespace MicroCloud.AspNetCore.Mvc
{
    /// <summary>
    /// MicroCloud Api授权，应用<see cref="AuthorizationRequirement.Policy"/>授权策略和
    /// <see cref="JwtBearerDefaults.AuthenticationScheme"/>授权计划
    /// </summary>
    public class ApiAuthorizeAttribute : AuthorizeAttribute
    {
        /// <summary>
        /// 初始化一个<see cref="ApiAuthorizeAttribute"/>类型的新实例
        /// </summary>
        public ApiAuthorizeAttribute()
        {
            Policy = AuthorizationRequirement.Policy;
            AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme;
        }

    }
}